﻿#include <iostream>
#include <vector>
using namespace std;


class Solution
{
public:
    // 75. 颜色分类
    void sortColors(vector<int>& nums)
    {
        int i = 0, left = -1, right = nums.size();
        while (i < right)
        {
            if (nums[i] == 0)
                swap(nums[++left], nums[i++]);
            else if (nums[i] == 1)
                i++;
            else
                swap(nums[--right], nums[i]);
        }
    }
};

int main()
{

    return 0;
}